@echo *** usage: %~n0 [maj] [min] [build]

@echo.
@echo.
@echo.
@echo.
@echo *** check version:
@grep APPLICATION_VERSION inc/SingaporeBusDocument.h
@grep "{\"SingaporeBus\"}" */*.pkg

@echo.
@echo.
@echo.
@echo.
@echo *** change version:
@echo sed -i -e "/APPLICATION_VERSION/s/[0-9]\.[0-9]\.[0-9]/%1.%2.%3/" inc/SingaporeBusDocument.h
@echo sed -i -e "/{\"SingaporeBus\"}/s/[0-9],[0-9],[0-9]/%1,%2,%3/" */*.pkg
@echo unix2dos */*.pkg

@echo.
@echo.
@echo.
@echo.
@echo *** check any unwanted log/notices:
@grep -i -r -e "PrintNoteL(_L" -e "PrintNote2L(_L" -e "S__LINE__" -e "RDebug" -e "LogFile" *



@echo.
@echo.
@echo.
@echo.
@echo *** build binaries:
@echo buildForDevices.bat


@echo.
@echo.
@echo.
@echo.
@echo *** write manifest:
@echo notepad manifestcore.txt

@echo.
@echo.
@echo.
@echo.
@echo *** create manifest:
@echo echo %1.%2.%3^> manifest.txt
@echo echo https://projects.developer.nokia.com/SingaporeBus/files/latest%%20release%%20-%%20v%1.%2.%3/SingaporeBusSelfSigned_%1.%2.%3.sisx^>^> manifest.txt
@echo type manifestcore.txt^>^> manifest.txt
@echo echo %1.%2.%3^> manifestcs.txt
@echo echo http://projects.developer.nokia.com/SingaporeBus^>^> manifestcs.txt
@echo type manifestcore.txt^>^> manifestcs.txt
@echo echo %1.%2.%3^> manifestovi.txt
@echo echo http://store.ovi.com/content/90485^>^> manifestovi.txt
@echo type manifestcore.txt^>^> manifestovi.txt
@echo dos2unix manifest.txt
@echo dos2unix manifestcs.txt
@echo dos2unix manifestovi.txt

@echo.
@echo.
@echo.
@echo.
@echo *** upload files:
@echo cadaver "http://projects.developer.nokia.com/dav/SingaporeBus"
@echo mkdir "latest release - v%1.%2.%3"
@echo cd "latest release - v%1.%2.%3"
@echo put "sisCross/SingaporeBusUnsigned_%1.%2.%3.sis"
@echo put "sisSelfSignedCross/SingaporeBusSelfSigned_%1.%2.%3.sisx"
@echo cd ..
@echo put manifest.txt
@echo put manifestcs.txt
@echo move "latest release - last" "previous releases"

@echo.
@echo.
@echo.
@echo.
@echo *** commit into svn:
@echo svn commit --username=sergiogiogio -m "bug fixes"

@echo.
@echo.
@echo.
@echo.
@echo *** release into svn:
@echo svn copy "https://projects.developer.nokia.com/svn/SingaporeBus/trunk" "https://projects.developer.nokia.com/svn/SingaporeBus/tags/v%1.%2.%3" --username=sergiogiogio -m "v%1.%2.%3 release"

@echo.
@echo.
@echo.
@echo.
@echo *** create the downloads:
@echo "C:\Program Files\Opera\opera.exe" "http://projects.developer.nokia.com/SingaporeBus/admin/downloads/downloads"

@echo.
@echo.
@echo.
@echo.
@echo *** publish to OVI store:
@echo "C:\Program Files\Opera\opera.exe" "https://publish.ovi.com/login"

@echo.
@echo.
@echo.
@echo.
@echo *** upload OVI files:
@echo cadaver "http://projects.developer.nokia.com/dav/SingaporeBus"
@echo put manifestovi.txt
